package com.ict.web.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ict.common.annotation.Excel;
import com.ict.common.utils.DateUtils;
import com.ict.common.utils.bean.BeanUtils;
import com.ict.web.domain.OrganizationManagement;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


@Data
public class UpdateOrganizationManagementDto {
  /** 机构Id */
  @ApiModelProperty(value = "机构Id")
  @JsonFormat(shape = JsonFormat.Shape.STRING)
  @TableId(value = "orm_id",type = IdType.INPUT)
  private Long ormId;

  /** 机构名称 */
  @Excel(name = "机构名称")
  private String organizationName;

  /** 机构类型 */
  @Excel(name = "机构类型")
  private String organizationType;

  /** 联系人 */
  @Excel(name = "联系人")
  private String contacts;

  /** 联系电话 */
  @Excel(name = "联系电话")
  private String contactNumber;

  /** 传真 */
  @Excel(name = "传真")
  private String fax;

  /** 联系地址 */
  @Excel(name = "联系地址")
  private String address;

  /** 联系地址 */
  @Excel(name = "联系地址")
  private Long deptId;

  public static OrganizationManagement of(UpdateOrganizationManagementDto updateDto){
    OrganizationManagement bean = new  OrganizationManagement();
    BeanUtils.copyProperties(updateDto,bean);
    //这是更新时间
    bean.setUpdateTime(DateUtils.getNowDate());

    return bean;
  }

}
